﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="nDetail.aspx.cs" Inherits="nDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <h2>交涉細項</h2>
    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
        DataKeyNames="NId" DataSourceID="SqlDataSource1" Height="50px" Width="100%">
        <Fields>
            <asp:BoundField DataField="WId" HeaderText="通緝令ID" SortExpression="WId" />
            <asp:BoundField DataField="NId" HeaderText="交涉ID" InsertVisible="False" 
                ReadOnly="True" SortExpression="NId" />
            <asp:BoundField DataField="MName" HeaderText="交涉人" SortExpression="MName" />
            <asp:BoundField DataField="NDate" HeaderText="交涉時間" SortExpression="NDate" 
                DataFormatString="{0:d}" />
            <asp:BoundField DataField="NDealDate" HeaderText="交易時間" 
                SortExpression="NDealDate" DataFormatString="{0:d}" />
            <asp:BoundField DataField="GCthird" HeaderText="商品種類" 
                SortExpression="GCthird" />
            <asp:BoundField DataField="NGName" HeaderText="交涉商品名稱" 
                SortExpression="NGName" />
            <asp:BoundField DataField="NGAmount" HeaderText="交涉商品數量" 
                SortExpression="NGAmount" />
            <asp:BoundField DataField="NGBudget" HeaderText="交涉商品預算" 
                SortExpression="NGBudget" />
            <asp:BoundField DataField="NGApp" HeaderText="交涉商品用途" SortExpression="NGApp" />
            <asp:BoundField DataField="NGBrand" HeaderText="交涉商品品牌" 
                SortExpression="NGBrand" />
            <asp:BoundField DataField="NGDescription" HeaderText="交涉商品外觀描述" 
                SortExpression="NGDescription" />
            <asp:BoundField DataField="NGMadeIn" HeaderText="交涉商品國籍產地" 
                SortExpression="NGMadeIn" />
            <asp:BoundField DataField="NGYear" HeaderText="交涉商品年分" 
                SortExpression="NGYear" DataFormatString="{0:d}" />
            <asp:ImageField DataImageUrlField="GPServName" 
                DataImageUrlFormatString="~/thumb/{0}" HeaderText="商品圖片">
            </asp:ImageField>
        </Fields>
    </asp:DetailsView>
    <asp:Button ID="btnDeal" runat="server" Text="成立交易" 
        Visible="False" onclick="btnDeal_Click" />
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:projectConnectionString %>" 
        SelectCommand="SELECT Negotiation.NId, Negotiation.WId, Negotiation.NDate, Member.MName, Negotiation.NGApp, Negotiation.NGAmount, Negotiation.NGName, Negotiation.NGDescription, Negotiation.NGYear, Negotiation.NGBrand, Negotiation.NGMadeIn, Negotiation.NGBudget, GoodsPic.GPServName, GoodsCategory.GCthird, Negotiation.NDealDate FROM Negotiation INNER JOIN Member ON Negotiation.MId = Member.MId INNER JOIN GoodsPic ON Negotiation.NGPId = GoodsPic.GPId INNER JOIN GoodsCategory ON Negotiation.GCId = GoodsCategory.GCId WHERE (Negotiation.NId = @NId)">
        <SelectParameters>
            <asp:QueryStringParameter DefaultValue="1" Name="NId" QueryStringField="NId" />
        </SelectParameters>
    </asp:SqlDataSource>
 
    </asp:Content>

